package com.alan.controller;


import com.alan.entity.RestBean;
import com.alan.service.MusicService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/")
public class MusicController {


    @Resource
    private MusicService musicService;

    @GetMapping("queryBroadCast")
    public RestBean getMusicList(){
        return musicService.getAllMusicList();
    }

    @PostMapping("queryMusic")
    public RestBean getMusicById(@RequestParam("position") Integer id){
        return musicService.getMusicById(id);
    }

}
